

import static org.junit.Assert.*;

import java.util.Date;

import org.junit.Test;

public class WhenDurationListSized40 {

	
	@Test
	public void andWeAddListIsEmptyWeShouldGetSize0() throws Exception {
		// Arrange
		DurationList dl = new DurationList(40);
		// Act
		int size = dl.size();
		// Assert
		assertEquals(0, size);

	}
	
	@Test
	public void andWeAddAnotherDurationSizeShouldKeep40() throws Exception {
		// Arrange
		DurationList dl = new DurationList(40);
		for(int i = 0; i < 41 ; i ++) {
			dl.add(new Duration(new Date(), i));
		}
		// Act
		int size = dl.size();
		// Assert
		assertEquals(40, size);

	}
}
